<!DOCTYPE HTML>
<html>
<head>
  <title>执行力管理</title>
  <link rel="stylesheet" href="/stylesheets/style.css">
  <script src="/scripts/jquery.min.js"></script>
  <script src="/scripts/boot.js" type="text/javascript"></script>
  <link rel="stylesheet" href="/scripts/miniui/themes/default/miniui.css">
  <link rel="stylesheet" href="/scripts/miniui/themes/icons.css">
  <link rel="stylesheet" href="/scripts/miniui/themes/bootstrap/skin.css">
  <link rel="stylesheet" href="/editor/common.css">
  <script src="/scripts/miniui/miniui.js"></script>
</head>
<body  style="padding: 0;width: 99%;height: 92%">
<div style="width:100%;height:100%;">
  <div showCollapseButton="true" style="width: 100%;height: 100%">

    <div style="width:99%;">
      <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
        <table style="width:100%;">
          <tr>
            <td style="width:100%;">
              <a class="mini-button" iconCls="icon-edit" onclick="editIdentifyProp()">编辑</a>
            </td>
          </tr>
        </table>
      </div>
    </div>

    <div id="datagrid1" class="mini-datagrid" style="width:99%;height: 100%;"
         url="/getdata/getIntegralRatio" idField="id" allowResize="true"
         sizeList="[20,30,50,100]" pageSize="20"
    >
      <div property="columns">
        <div type="checkcolumn" width="15"></div>
        <div field="objectId" width="60" align="center" align="center" headerAlign="center">objectId</div>
        <div field="coin" width="80" align="center" align="center" headerAlign="center">积分</div>
        <div field="rmb" width="80" align="center" align="center" headerAlign="center">金额（元）</div>
        <div field="createdAt" width="80" align="center" headerAlign="center">创建日期</div>
        <div field="updatedAt" width="80" align="center" headerAlign="center">更新日期</div>
      </div>
    </div>
  </div>

</div>
</body>
<script type="text/javascript">
  var objectId;
  mini.parse();
  var grid2 = mini.get("datagrid1");
  grid2.load();
//  function onSelectionChanged(e) {
//    var tribeGrid = e.sender;
//    var record = tribeGrid.getSelected();
//    if (record) {
//      objectId = record.objectId;
////      grid3.load({objectId:record.objectId});
//    }
//  }

  function editIdentifyProp() {
    var currentRow = grid2.getSelected();
    if (currentRow) {
      mini.open({
        url: "/getdata/integralRatioEdit?objectId=" + currentRow.objectId,
        title: "编辑用户属性", width: 300, height: 200,
        ondestroy: function (action) {
          grid2.reload();
        }
      });
    } else {
      alert("请选中一条信息!");
      return;
    };
  };



</script>
</html>
